<!--
 * @Author: gyh
 * @Date: 2024-05-08 10:08:31
 * @LastEditTime: 2024-05-13 10:33:44
-->
// AddressPanel.vue
<script setup lang="ts">
import type { address } from '../../../types/address'

defineProps<{ list: address[] }>()
const emits = defineEmits<{
  (e: 'close'): void
}>()
</script>

<template>
  <view class="address-panel">
    <!-- 关闭按钮 -->
    <text class="close icon-close" @tap="emits('close')"></text>
    <!-- 标题 -->
    <view class="title">配送至</view>
    <!-- 内容 -->
    <view class="content">
      <view class="item" v-for="item in list" :key="item.id">
        <view class="user">{{ item.receiver }} {{ item.contact }}</view>
        <view class="address">{{ item.fullLocation }}{{ item.address }}</view>
        <text class="icon icon-checked"></text>
      </view>
    </view>
    <view class="footer">
      <view class="button primary"> 新建地址 </view>
      <view v-if="false" class="button primary">确定</view>
    </view>
  </view>
</template>

<style lang="scss">
@import '../styles/AddressPanel.scss';
</style>
